package com.vy.stl.mapper;

//@MapKey("count")

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @create: 2025/09/05 08:50
 * @description:
 */
public interface ChartsMapper {

    /*查询会员总数量 法一：
    @Select("select count(0) count from member")
    Map<String, Object> selectMemberTotal();*/

    /*@MapKey("count") 声明用count做key，但是实际上ML中select语句指定了列名（或别名），且接口方法返回值为Map<String, Object>时：MyBatis会将查询结果的列名（或别名）作为Map的key，该列对应的值作为Map的value，所以可以省略不写
    Map<String, Object> selectMemberTotal();*/

    Map<String, Object> selectMemberTotal();

    Map<String, Object> selectCoachTotal();

    Map<String, Object> selectCourseTotal();

    Map<String, Object> selectReserveTotal();

    List<Map<String, Object>> selectWeekMember(@Param("date") Date date);

    List<Map<String, Object>> selectWeekCourse(@Param("date") Date date);

    List<Map<String, Object>> selectWeekReserve(@Param("date") Date date);

    List<Map<String, Object>> getWeekCoach(@Param("date") Date date);

    List<Map<String, Object>> selectCourseOrderByReserve(@Param("date") Date date);

    List<Map<String, Object>> selectCoachOrderByReserve(@Param("date") Date date);
}
